﻿using FirstFloor.ModernUI.Presentation;
using FirstFloor.ModernUI.Windows.Controls;
using MetroGS.AppClass;
using MetroGS.Properties;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Media;

namespace MetroGS
{
    public partial class App : Application
    {
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            var theme = AppearanceManager.LightThemeSource;
            switch (Settings.Default.ThemeSource)
            {
                case "light":
                    theme = AppearanceManager.LightThemeSource;
                    break;

                case "dark":
                    theme = AppearanceManager.DarkThemeSource;
                    break;
            }

            AppearanceManager.Current.AccentColor = Settings.Default.Color;
            AppearanceManager.Current.ThemeSource = theme;
        }
    }
}
